import ProCard from '@ant-design/pro-card';
import { useEffect, useState } from 'react';

import { Input, Button, Radio } from 'antd';
import { getSetting } from '../../../services/ant-design-pro/api'


const smtp_son = () => {
    let [sdata, setsdata] = useState<any>([]);
    useEffect(() => {
        getSetting().then(res => {
            console.log(res.seoKeyword);
            console.log(res);

            setsdata(res);
        })
    }, [])

    return (
        <div>
            {/* smtp */}
            <ProCard direction="column" ghost gutter={[0, 8]}>
                {/* <ProForm.Group>
                    <ProFormText width={1060} name="company" label="SMTP地址" placeholder="请输入SMTP" />
                </ProForm.Group>
                <ProForm.Group>
                    <ProFormText width={1060} name="company" label="SMTP端口(强制使用SSL链接)" placeholder="请输入SMTP端口" />
                </ProForm.Group>
                <ProForm.Group>
                    <ProFormText width={1060} name="company" label="SMTP用户" placeholder="请输入SMTP用户" />
                </ProForm.Group>
                <ProForm.Group>
                    <ProFormText width={1060} name="company" label="SMTP密码" placeholder="请输入SMTP密码(可能为授权码)" />
                </ProForm.Group>
                <ProForm.Group>
                    <ProFormText width={1060} name="company" label="发件人" placeholder="请输入正确的邮箱地址" />
                </ProForm.Group>
                <Button key="3" type="primary">
                    保存
                </Button> */}

                <ProCard direction="column" ghost gutter={[0, 8]}>
                    <p>SMTP地址</p>
                    <Input placeholder="请输入SMTP" style={{ width: '1100px' }} value={sdata.smtpHost} />
                    
                    <p style={{ margin: '25px 0px 15px 0px' }}>SMTP端口(强制使用SSL链接)</p>
                    <Input placeholder="请输入SMTP端口" style={{ width: '1100px' }} value={sdata.smtpPort} />
                    
                    <p style={{ margin: '25px 0px 15px 0px' }}>SMTP用户</p>
                    <Input placeholder="请输入SMTP用户" style={{ width: '1100px' }} value={sdata.smtpUser} />

                    <p style={{ margin: '25px 0px 15px 0px' }}>SMTP密码</p>
                    <Input placeholder="请输入SMTP密码(可能为授权码)" style={{ width: '1100px' }} value={sdata.smtpPass} />

                    <p style={{ margin: '25px 0px 15px 0px' }}>发件人</p>
                    <Input placeholder="请输入正确的邮箱地址" style={{ width: '1100px' }} value={sdata.googleAnalyticsId} />
                    
                    <Button key="3" type="primary" style={{ margin: '35px 0px 15px 0px' }}>
                        保存
                    </Button>

                    <Radio.Button value="large" style={{ margin: '35px 0px 15px 20px' }}>测试</Radio.Button>
                </ProCard>
            </ProCard>
        </div>
    )
}
export default smtp_son